---
title: Dialog
description: A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
component: true
kobalte:
    link: https://kobalte.dev/docs/core/components/dialog
    api: https://kobalte.dev/docs/core/components/dialog#api-reference
---

<ComponentPreview name="dialog-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
    <TabsTrigger value="cli">CLI</TabsTrigger>
    <TabsTrigger value="manual">Manual</TabsTrigger>
    <TabsIndicator class="bg-primary" />
</TabsList>

<TabsContent value="cli">

```bash
npx shadcn-solid@latest add dialog
```

</TabsContent>

<TabsContent value="manual">

<Steps>

<Step>Install the following dependencies:</Step>

```bash
npm install @kobalte/core
```

<Step>Copy and paste the following code into your project.</Step>

<ComponentSource name="dialog" />

<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsContent>

</Tabs>

## Usage

```tsx
import {
    Dialog,
    DialogContent,
    DialogDescription,
    DialogHeader,
    DialogTitle,
    DialogTrigger,
} from "@/components/ui/dialog"
```

```tsx
<Dialog>
    <DialogTrigger>Open</DialogTrigger>
    <DialogContent>
        <DialogHeader>
            <DialogTitle>Are you sure absolutely sure?</DialogTitle>
            <DialogDescription>
                This action cannot be undone. This will permanently delete your
                account and remove your data from our servers.
            </DialogDescription>
        </DialogHeader>
    </DialogContent>
</Dialog>
```
